//
//  TitleTableViewCell.m
//  HeWeiZhiNeng
//
//  Created by 林建 on 17/12/1.
//  Copyright © 2017年 YanCeyMichael.github.io. All rights reserved.
//

#import "TitleTableViewCell.h"

@implementation TitleTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //
        self.MainView = [UIImageView new];
        [self addSubview:self.MainView];
        //
        self.titleLabel = [UILabel new];
        self.titleLabel.textColor = Color.theme;
        self.titleLabel.font = Common_Font(15);
        [self addSubview:self.titleLabel];
        //
        self.lineV = [[UIView alloc]init];
        self.lineV.hidden = YES;
        self.lineV.backgroundColor = Color.line;
        [self addSubview:self.lineV];
    }
    return self;
}

-(void)layoutSubviews{
    [self.MainView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.mas_centerY);
        make.left.mas_equalTo(self.mas_left).offset(15);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(30);
    }];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.mas_centerY);
        make.left.mas_equalTo(self.MainView.mas_right).offset(15);
    }];
    [self.lineV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self.mas_bottom);
        make.left.mas_equalTo(self.mas_left);
        make.height.mas_equalTo(1);
        make.right.mas_equalTo(self.mas_right);
    }];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
